
let token = localStorage.getItem('token')
// let username = localStorage.getItem('username')
let id = localStorage.getItem('id')

    let pListAPI = `http://jx.xuzhixiang.top/ap/api/productlist.php`
    axios.get(pListAPI, {
        params: {
            uid: id
        }
    }).then(res => {
        let html = ''
        for (let i = 0; i < res.data.data.length; i++) {
            let pObj = res.data.data[i]
            html += `
            <li>
                    <a href="修改.html?pid=${pObj.pid}">
                    <img src="${pObj.pimg}">
                    <h2>${pObj.pname}</h2>
                    <p>${pObj.pprice}</p>
                    
                    
                </li>
            `
        }
        let list = document.querySelector('.list')
        console.log(list)
        list.innerHTML = html
    })
